home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Programming / gcc-2.95.3-3 / info / gcc.info-22 < prev    next >
Encoding:
GNU Info File  |  2001-07-15  |  42.2 KB  |  1,003 lines

  1. This is Info file gcc.info, produced by Makeinfo version 1.68 from the
  2. input file ./gcc.texi.
  3.  
  4. INFO-DIR-SECTION Programming
  5. START-INFO-DIR-ENTRY
  6. * gcc: (gcc).                  The GNU Compiler Collection.
  7. END-INFO-DIR-ENTRY
  8.    This file documents the use and the internals of the GNU compiler.
  9.  
  10.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  11. Boston, MA 02111-1307 USA
  12.  
  13.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
  14. 1999, 2000 Free Software Foundation, Inc.
  15.  
  16.    Permission is granted to make and distribute verbatim copies of this
  17. manual provided the copyright notice and this permission notice are
  18. preserved on all copies.
  19.  
  20.    Permission is granted to copy and distribute modified versions of
  21. this manual under the conditions for verbatim copying, provided also
  22. that the sections entitled "GNU General Public License" and "Funding
  23. for Free Software" are included exactly as in the original, and
  24. provided that the entire resulting derived work is distributed under
  25. the terms of a permission notice identical to this one.
  26.  
  27.    Permission is granted to copy and distribute translations of this
  28. manual into another language, under the above conditions for modified
  29. versions, except that the sections entitled "GNU General Public
  30. License" and "Funding for Free Software", and this permission notice,
  31. may be included in translations approved by the Free Software Foundation
  32. instead of in the original English.
  33.  
  34. 
  35. File: gcc.info,  Node: Storage Layout,  Next: Type Layout,  Prev: Run-time Target,  Up: Target Macros
  36.  
  37. Storage Layout
  38. ==============
  39.  
  40.    Note that the definitions of the macros in this table which are
  41. sizes or alignments measured in bits do not need to be constant.  They
  42. can be C expressions that refer to static variables, such as the
  43. `target_flags'.  *Note Run-time Target::.
  44.  
  45. `BITS_BIG_ENDIAN'
  46.      Define this macro to have the value 1 if the most significant bit
  47.      in a byte has the lowest number; otherwise define it to have the
  48.      value zero.  This means that bit-field instructions count from the
  49.      most significant bit.  If the machine has no bit-field
  50.      instructions, then this must still be defined, but it doesn't
  51.      matter which value it is defined to.  This macro need not be a
  52.      constant.
  53.  
  54.      This macro does not affect the way structure fields are packed into
  55.      bytes or words; that is controlled by `BYTES_BIG_ENDIAN'.
  56.  
  57. `BYTES_BIG_ENDIAN'
  58.      Define this macro to have the value 1 if the most significant byte
  59.      in a word has the lowest number.  This macro need not be a
  60.      constant.
  61.  
  62. `WORDS_BIG_ENDIAN'
  63.      Define this macro to have the value 1 if, in a multiword object,
  64.      the most significant word has the lowest number.  This applies to
  65.      both memory locations and registers; GNU CC fundamentally assumes
  66.      that the order of words in memory is the same as the order in
  67.      registers.  This macro need not be a constant.
  68.  
  69. `LIBGCC2_WORDS_BIG_ENDIAN'
  70.      Define this macro if WORDS_BIG_ENDIAN is not constant.  This must
  71.      be a constant value with the same meaning as WORDS_BIG_ENDIAN,
  72.      which will be used only when compiling libgcc2.c.  Typically the
  73.      value will be set based on preprocessor defines.
  74.  
  75. `FLOAT_WORDS_BIG_ENDIAN'
  76.      Define this macro to have the value 1 if `DFmode', `XFmode' or
  77.      `TFmode' floating point numbers are stored in memory with the word
  78.      containing the sign bit at the lowest address; otherwise define it
  79.      to have the value 0.  This macro need not be a constant.
  80.  
  81.      You need not define this macro if the ordering is the same as for
  82.      multi-word integers.
  83.  
  84. `BITS_PER_UNIT'
  85.      Define this macro to be the number of bits in an addressable
  86.      storage unit (byte); normally 8.
  87.  
  88. `BITS_PER_WORD'
  89.      Number of bits in a word; normally 32.
  90.  
  91. `MAX_BITS_PER_WORD'
  92.      Maximum number of bits in a word.  If this is undefined, the
  93.      default is `BITS_PER_WORD'.  Otherwise, it is the constant value
  94.      that is the largest value that `BITS_PER_WORD' can have at
  95.      run-time.
  96.  
  97. `UNITS_PER_WORD'
  98.      Number of storage units in a word; normally 4.
  99.  
  100. `MIN_UNITS_PER_WORD'
  101.      Minimum number of units in a word.  If this is undefined, the
  102.      default is `UNITS_PER_WORD'.  Otherwise, it is the constant value
  103.      that is the smallest value that `UNITS_PER_WORD' can have at
  104.      run-time.
  105.  
  106. `POINTER_SIZE'
  107.      Width of a pointer, in bits.  You must specify a value no wider
  108.      than the width of `Pmode'.  If it is not equal to the width of
  109.      `Pmode', you must define `POINTERS_EXTEND_UNSIGNED'.
  110.  
  111. `POINTERS_EXTEND_UNSIGNED'
  112.      A C expression whose value is nonzero if pointers that need to be
  113.      extended from being `POINTER_SIZE' bits wide to `Pmode' are to be
  114.      zero-extended and zero if they are to be sign-extended.
  115.  
  116.      You need not define this macro if the `POINTER_SIZE' is equal to
  117.      the width of `Pmode'.
  118.  
  119. `PROMOTE_MODE (M, UNSIGNEDP, TYPE)'
  120.      A macro to update M and UNSIGNEDP when an object whose type is
  121.      TYPE and which has the specified mode and signedness is to be
  122.      stored in a register.  This macro is only called when TYPE is a
  123.      scalar type.
  124.  
  125.      On most RISC machines, which only have operations that operate on
  126.      a full register, define this macro to set M to `word_mode' if M is
  127.      an integer mode narrower than `BITS_PER_WORD'.  In most cases,
  128.      only integer modes should be widened because wider-precision
  129.      floating-point operations are usually more expensive than their
  130.      narrower counterparts.
  131.  
  132.      For most machines, the macro definition does not change UNSIGNEDP.
  133.      However, some machines, have instructions that preferentially
  134.      handle either signed or unsigned quantities of certain modes.  For
  135.      example, on the DEC Alpha, 32-bit loads from memory and 32-bit add
  136.      instructions sign-extend the result to 64 bits.  On such machines,
  137.      set UNSIGNEDP according to which kind of extension is more
  138.      efficient.
  139.  
  140.      Do not define this macro if it would never modify M.
  141.  
  142. `PROMOTE_FUNCTION_ARGS'
  143.      Define this macro if the promotion described by `PROMOTE_MODE'
  144.      should also be done for outgoing function arguments.
  145.  
  146. `PROMOTE_FUNCTION_RETURN'
  147.      Define this macro if the promotion described by `PROMOTE_MODE'
  148.      should also be done for the return value of functions.
  149.  
  150.      If this macro is defined, `FUNCTION_VALUE' must perform the same
  151.      promotions done by `PROMOTE_MODE'.
  152.  
  153. `PROMOTE_FOR_CALL_ONLY'
  154.      Define this macro if the promotion described by `PROMOTE_MODE'
  155.      should *only* be performed for outgoing function arguments or
  156.      function return values, as specified by `PROMOTE_FUNCTION_ARGS'
  157.      and `PROMOTE_FUNCTION_RETURN', respectively.
  158.  
  159. `PARM_BOUNDARY'
  160.      Normal alignment required for function parameters on the stack, in
  161.      bits.  All stack parameters receive at least this much alignment
  162.      regardless of data type.  On most machines, this is the same as the
  163.      size of an integer.
  164.  
  165. `STACK_BOUNDARY'
  166.      Define this macro if there is a guaranteed alignment for the stack
  167.      pointer on this machine.  The definition is a C expression for the
  168.      desired alignment (measured in bits).  This value is used as a
  169.      default if PREFERRED_STACK_BOUNDARY is not defined.
  170.  
  171. `PREFERRED_STACK_BOUNDARY'
  172.      Define this macro if you wish to preserve a certain alignment for
  173.      the stack pointer.  The definition is a C expression for the
  174.      desired alignment (measured in bits).  If STACK_BOUNDARY is also
  175.      defined, this macro must evaluate to a value equal to or larger
  176.      than STACK_BOUNDARY.
  177.  
  178.      If `PUSH_ROUNDING' is not defined, the stack will always be aligned
  179.      to the specified boundary.  If `PUSH_ROUNDING' is defined and
  180.      specifies a less strict alignment than `PREFERRED_STACK_BOUNDARY',
  181.      the stack may be momentarily unaligned while pushing arguments.
  182.  
  183. `FUNCTION_BOUNDARY'
  184.      Alignment required for a function entry point, in bits.
  185.  
  186. `BIGGEST_ALIGNMENT'
  187.      Biggest alignment that any data type can require on this machine,
  188.      in bits.
  189.  
  190. `MINIMUM_ATOMIC_ALIGNMENT'
  191.      If defined, the smallest alignment, in bits, that can be given to
  192.      an object that can be referenced in one operation, without
  193.      disturbing any nearby object.  Normally, this is `BITS_PER_UNIT',
  194.      but may be larger on machines that don't have byte or half-word
  195.      store operations.
  196.  
  197. `BIGGEST_FIELD_ALIGNMENT'
  198.      Biggest alignment that any structure field can require on this
  199.      machine, in bits.  If defined, this overrides `BIGGEST_ALIGNMENT'
  200.      for structure fields only.
  201.  
  202. `ADJUST_FIELD_ALIGN (FIELD, COMPUTED)'
  203.      An expression for the alignment of a structure field FIELD if the
  204.      alignment computed in the usual way is COMPUTED.  GNU CC uses this
  205.      value instead of the value in `BIGGEST_ALIGNMENT' or
  206.      `BIGGEST_FIELD_ALIGNMENT', if defined, for structure fields only.
  207.  
  208. `MAX_OFILE_ALIGNMENT'
  209.      Biggest alignment supported by the object file format of this
  210.      machine.  Use this macro to limit the alignment which can be
  211.      specified using the `__attribute__ ((aligned (N)))' construct.  If
  212.      not defined, the default value is `BIGGEST_ALIGNMENT'.
  213.  
  214. `DATA_ALIGNMENT (TYPE, BASIC-ALIGN)'
  215.      If defined, a C expression to compute the alignment for a
  216.      variables in the static store.  TYPE is the data type, and
  217.      BASIC-ALIGN is the alignment that the object would ordinarily
  218.      have.  The value of this macro is used instead of that alignment
  219.      to align the object.
  220.  
  221.      If this macro is not defined, then BASIC-ALIGN is used.
  222.  
  223.      One use of this macro is to increase alignment of medium-size data
  224.      to make it all fit in fewer cache lines.  Another is to cause
  225.      character arrays to be word-aligned so that `strcpy' calls that
  226.      copy constants to character arrays can be done inline.
  227.  
  228. `CONSTANT_ALIGNMENT (CONSTANT, BASIC-ALIGN)'
  229.      If defined, a C expression to compute the alignment given to a
  230.      constant that is being placed in memory.  CONSTANT is the constant
  231.      and BASIC-ALIGN is the alignment that the object would ordinarily
  232.      have.  The value of this macro is used instead of that alignment to
  233.      align the object.
  234.  
  235.      If this macro is not defined, then BASIC-ALIGN is used.
  236.  
  237.      The typical use of this macro is to increase alignment for string
  238.      constants to be word aligned so that `strcpy' calls that copy
  239.      constants can be done inline.
  240.  
  241. `LOCAL_ALIGNMENT (TYPE, BASIC-ALIGN)'
  242.      If defined, a C expression to compute the alignment for a
  243.      variables in the local store.  TYPE is the data type, and
  244.      BASIC-ALIGN is the alignment that the object would ordinarily
  245.      have.  The value of this macro is used instead of that alignment
  246.      to align the object.
  247.  
  248.      If this macro is not defined, then BASIC-ALIGN is used.
  249.  
  250.      One use of this macro is to increase alignment of medium-size data
  251.      to make it all fit in fewer cache lines.
  252.  
  253. `EMPTY_FIELD_BOUNDARY'
  254.      Alignment in bits to be given to a structure bit field that
  255.      follows an empty field such as `int : 0;'.
  256.  
  257.      Note that `PCC_BITFIELD_TYPE_MATTERS' also affects the alignment
  258.      that results from an empty field.
  259.  
  260. `STRUCTURE_SIZE_BOUNDARY'
  261.      Number of bits which any structure or union's size must be a
  262.      multiple of.  Each structure or union's size is rounded up to a
  263.      multiple of this.
  264.  
  265.      If you do not define this macro, the default is the same as
  266.      `BITS_PER_UNIT'.
  267.  
  268. `STRICT_ALIGNMENT'
  269.      Define this macro to be the value 1 if instructions will fail to
  270.      work if given data not on the nominal alignment.  If instructions
  271.      will merely go slower in that case, define this macro as 0.
  272.  
  273. `PCC_BITFIELD_TYPE_MATTERS'
  274.      Define this if you wish to imitate the way many other C compilers
  275.      handle alignment of bitfields and the structures that contain them.
  276.  
  277.      The behavior is that the type written for a bitfield (`int',
  278.      `short', or other integer type) imposes an alignment for the
  279.      entire structure, as if the structure really did contain an
  280.      ordinary field of that type.  In addition, the bitfield is placed
  281.      within the structure so that it would fit within such a field, not
  282.      crossing a boundary for it.
  283.  
  284.      Thus, on most machines, a bitfield whose type is written as `int'
  285.      would not cross a four-byte boundary, and would force four-byte
  286.      alignment for the whole structure.  (The alignment used may not be
  287.      four bytes; it is controlled by the other alignment parameters.)
  288.  
  289.      If the macro is defined, its definition should be a C expression;
  290.      a nonzero value for the expression enables this behavior.
  291.  
  292.      Note that if this macro is not defined, or its value is zero, some
  293.      bitfields may cross more than one alignment boundary.  The
  294.      compiler can support such references if there are `insv', `extv',
  295.      and `extzv' insns that can directly reference memory.
  296.  
  297.      The other known way of making bitfields work is to define
  298.      `STRUCTURE_SIZE_BOUNDARY' as large as `BIGGEST_ALIGNMENT'.  Then
  299.      every structure can be accessed with fullwords.
  300.  
  301.      Unless the machine has bitfield instructions or you define
  302.      `STRUCTURE_SIZE_BOUNDARY' that way, you must define
  303.      `PCC_BITFIELD_TYPE_MATTERS' to have a nonzero value.
  304.  
  305.      If your aim is to make GNU CC use the same conventions for laying
  306.      out bitfields as are used by another compiler, here is how to
  307.      investigate what the other compiler does.  Compile and run this
  308.      program:
  309.  
  310.           struct foo1
  311.           {
  312.             char x;
  313.             char :0;
  314.             char y;
  315.           };
  316.           
  317.           struct foo2
  318.           {
  319.             char x;
  320.             int :0;
  321.             char y;
  322.           };
  323.           
  324.           main ()
  325.           {
  326.             printf ("Size of foo1 is %d\n",
  327.                     sizeof (struct foo1));
  328.             printf ("Size of foo2 is %d\n",
  329.                     sizeof (struct foo2));
  330.             exit (0);
  331.           }
  332.  
  333.      If this prints 2 and 5, then the compiler's behavior is what you
  334.      would get from `PCC_BITFIELD_TYPE_MATTERS'.
  335.  
  336. `BITFIELD_NBYTES_LIMITED'
  337.      Like PCC_BITFIELD_TYPE_MATTERS except that its effect is limited to
  338.      aligning a bitfield within the structure.
  339.  
  340. `ROUND_TYPE_SIZE (TYPE, COMPUTED, SPECIFIED)'
  341.      Define this macro as an expression for the overall size of a type
  342.      (given by TYPE as a tree node) when the size computed in the usual
  343.      way is COMPUTED and the alignment is SPECIFIED.
  344.  
  345.      The default is to round COMPUTED up to a multiple of SPECIFIED.
  346.  
  347. `ROUND_TYPE_ALIGN (TYPE, COMPUTED, SPECIFIED)'
  348.      Define this macro as an expression for the alignment of a type
  349.      (given by TYPE as a tree node) if the alignment computed in the
  350.      usual way is COMPUTED and the alignment explicitly specified was
  351.      SPECIFIED.
  352.  
  353.      The default is to use SPECIFIED if it is larger; otherwise, use
  354.      the smaller of COMPUTED and `BIGGEST_ALIGNMENT'
  355.  
  356. `MAX_FIXED_MODE_SIZE'
  357.      An integer expression for the size in bits of the largest integer
  358.      machine mode that should actually be used.  All integer machine
  359.      modes of this size or smaller can be used for structures and
  360.      unions with the appropriate sizes.  If this macro is undefined,
  361.      `GET_MODE_BITSIZE (DImode)' is assumed.
  362.  
  363. `STACK_SAVEAREA_MODE (SAVE_LEVEL)'
  364.      If defined, an expression of type `enum machine_mode' that
  365.      specifies the mode of the save area operand of a
  366.      `save_stack_LEVEL' named pattern (*note Standard Names::.).
  367.      SAVE_LEVEL is one of `SAVE_BLOCK', `SAVE_FUNCTION', or
  368.      `SAVE_NONLOCAL' and selects which of the three named patterns is
  369.      having its mode specified.
  370.  
  371.      You need not define this macro if it always returns `Pmode'.  You
  372.      would most commonly define this macro if the `save_stack_LEVEL'
  373.      patterns need to support both a 32- and a 64-bit mode.
  374.  
  375. `STACK_SIZE_MODE'
  376.      If defined, an expression of type `enum machine_mode' that
  377.      specifies the mode of the size increment operand of an
  378.      `allocate_stack' named pattern (*note Standard Names::.).
  379.  
  380.      You need not define this macro if it always returns `word_mode'.
  381.      You would most commonly define this macro if the `allocate_stack'
  382.      pattern needs to support both a 32- and a 64-bit mode.
  383.  
  384. `CHECK_FLOAT_VALUE (MODE, VALUE, OVERFLOW)'
  385.      A C statement to validate the value VALUE (of type `double') for
  386.      mode MODE.  This means that you check whether VALUE fits within
  387.      the possible range of values for mode MODE on this target machine.
  388.      The mode MODE is always a mode of class `MODE_FLOAT'.  OVERFLOW
  389.      is nonzero if the value is already known to be out of range.
  390.  
  391.      If VALUE is not valid or if OVERFLOW is nonzero, you should set
  392.      OVERFLOW to 1 and then assign some valid value to VALUE.  Allowing
  393.      an invalid value to go through the compiler can produce incorrect
  394.      assembler code which may even cause Unix assemblers to crash.
  395.  
  396.      This macro need not be defined if there is no work for it to do.
  397.  
  398. `TARGET_FLOAT_FORMAT'
  399.      A code distinguishing the floating point format of the target
  400.      machine.  There are three defined values:
  401.  
  402.     `IEEE_FLOAT_FORMAT'
  403.           This code indicates IEEE floating point.  It is the default;
  404.           there is no need to define this macro when the format is IEEE.
  405.  
  406.     `VAX_FLOAT_FORMAT'
  407.           This code indicates the peculiar format used on the Vax.
  408.  
  409.     `UNKNOWN_FLOAT_FORMAT'
  410.           This code indicates any other format.
  411.  
  412.      The value of this macro is compared with `HOST_FLOAT_FORMAT'
  413.      (*note Config::.) to determine whether the target machine has the
  414.      same format as the host machine.  If any other formats are
  415.      actually in use on supported machines, new codes should be defined
  416.      for them.
  417.  
  418.      The ordering of the component words of floating point values
  419.      stored in memory is controlled by `FLOAT_WORDS_BIG_ENDIAN' for the
  420.      target machine and `HOST_FLOAT_WORDS_BIG_ENDIAN' for the host.
  421.  
  422. `DEFAULT_VTABLE_THUNKS'
  423.      GNU CC supports two ways of implementing C++ vtables:  traditional
  424.      or with so-called "thunks".  The flag `-fvtable-thunk' chooses
  425.      between them.  Define this macro to be a C expression for the
  426.      default value of that flag.  If `DEFAULT_VTABLE_THUNKS' is 0, GNU
  427.      CC uses the traditional implementation by default.  The "thunk"
  428.      implementation is more efficient (especially if you have provided
  429.      an implementation of `ASM_OUTPUT_MI_THUNK', see *Note Function
  430.      Entry::.), but is not binary compatible with code compiled using
  431.      the traditional implementation.  If you are writing a new ports,
  432.      define `DEFAULT_VTABLE_THUNKS' to 1.
  433.  
  434.      If you do not define this macro, the default for `-fvtable-thunk'
  435.      is 0.
  436.  
  437. 
  438. File: gcc.info,  Node: Type Layout,  Next: Registers,  Prev: Storage Layout,  Up: Target Macros
  439.  
  440. Layout of Source Language Data Types
  441. ====================================
  442.  
  443.    These macros define the sizes and other characteristics of the
  444. standard basic data types used in programs being compiled.  Unlike the
  445. macros in the previous section, these apply to specific features of C
  446. and related languages, rather than to fundamental aspects of storage
  447. layout.
  448.  
  449. `INT_TYPE_SIZE'
  450.      A C expression for the size in bits of the type `int' on the
  451.      target machine.  If you don't define this, the default is one word.
  452.  
  453. `MAX_INT_TYPE_SIZE'
  454.      Maximum number for the size in bits of the type `int' on the target
  455.      machine.  If this is undefined, the default is `INT_TYPE_SIZE'.
  456.      Otherwise, it is the constant value that is the largest value that
  457.      `INT_TYPE_SIZE' can have at run-time.  This is used in `cpp'.
  458.  
  459. `SHORT_TYPE_SIZE'
  460.      A C expression for the size in bits of the type `short' on the
  461.      target machine.  If you don't define this, the default is half a
  462.      word.  (If this would be less than one storage unit, it is rounded
  463.      up to one unit.)
  464.  
  465. `LONG_TYPE_SIZE'
  466.      A C expression for the size in bits of the type `long' on the
  467.      target machine.  If you don't define this, the default is one word.
  468.  
  469. `MAX_LONG_TYPE_SIZE'
  470.      Maximum number for the size in bits of the type `long' on the
  471.      target machine.  If this is undefined, the default is
  472.      `LONG_TYPE_SIZE'.  Otherwise, it is the constant value that is the
  473.      largest value that `LONG_TYPE_SIZE' can have at run-time.  This is
  474.      used in `cpp'.
  475.  
  476. `LONG_LONG_TYPE_SIZE'
  477.      A C expression for the size in bits of the type `long long' on the
  478.      target machine.  If you don't define this, the default is two
  479.      words.  If you want to support GNU Ada on your machine, the value
  480.      of macro must be at least 64.
  481.  
  482. `CHAR_TYPE_SIZE'
  483.      A C expression for the size in bits of the type `char' on the
  484.      target machine.  If you don't define this, the default is one
  485.      quarter of a word.  (If this would be less than one storage unit,
  486.      it is rounded up to one unit.)
  487.  
  488. `MAX_CHAR_TYPE_SIZE'
  489.      Maximum number for the size in bits of the type `char' on the
  490.      target machine.  If this is undefined, the default is
  491.      `CHAR_TYPE_SIZE'.  Otherwise, it is the constant value that is the
  492.      largest value that `CHAR_TYPE_SIZE' can have at run-time.  This is
  493.      used in `cpp'.
  494.  
  495. `FLOAT_TYPE_SIZE'
  496.      A C expression for the size in bits of the type `float' on the
  497.      target machine.  If you don't define this, the default is one word.
  498.  
  499. `DOUBLE_TYPE_SIZE'
  500.      A C expression for the size in bits of the type `double' on the
  501.      target machine.  If you don't define this, the default is two
  502.      words.
  503.  
  504. `LONG_DOUBLE_TYPE_SIZE'
  505.      A C expression for the size in bits of the type `long double' on
  506.      the target machine.  If you don't define this, the default is two
  507.      words.
  508.  
  509. `WIDEST_HARDWARE_FP_SIZE'
  510.      A C expression for the size in bits of the widest floating-point
  511.      format supported by the hardware.  If you define this macro, you
  512.      must specify a value less than or equal to the value of
  513.      `LONG_DOUBLE_TYPE_SIZE'.  If you do not define this macro, the
  514.      value of `LONG_DOUBLE_TYPE_SIZE' is the default.
  515.  
  516. `DEFAULT_SIGNED_CHAR'
  517.      An expression whose value is 1 or 0, according to whether the type
  518.      `char' should be signed or unsigned by default.  The user can
  519.      always override this default with the options `-fsigned-char' and
  520.      `-funsigned-char'.
  521.  
  522. `DEFAULT_SHORT_ENUMS'
  523.      A C expression to determine whether to give an `enum' type only as
  524.      many bytes as it takes to represent the range of possible values
  525.      of that type.  A nonzero value means to do that; a zero value
  526.      means all `enum' types should be allocated like `int'.
  527.  
  528.      If you don't define the macro, the default is 0.
  529.  
  530. `SIZE_TYPE'
  531.      A C expression for a string describing the name of the data type
  532.      to use for size values.  The typedef name `size_t' is defined
  533.      using the contents of the string.
  534.  
  535.      The string can contain more than one keyword.  If so, separate
  536.      them with spaces, and write first any length keyword, then
  537.      `unsigned' if appropriate, and finally `int'.  The string must
  538.      exactly match one of the data type names defined in the function
  539.      `init_decl_processing' in the file `c-decl.c'.  You may not omit
  540.      `int' or change the order--that would cause the compiler to crash
  541.      on startup.
  542.  
  543.      If you don't define this macro, the default is `"long unsigned
  544.      int"'.
  545.  
  546. `PTRDIFF_TYPE'
  547.      A C expression for a string describing the name of the data type
  548.      to use for the result of subtracting two pointers.  The typedef
  549.      name `ptrdiff_t' is defined using the contents of the string.  See
  550.      `SIZE_TYPE' above for more information.
  551.  
  552.      If you don't define this macro, the default is `"long int"'.
  553.  
  554. `WCHAR_TYPE'
  555.      A C expression for a string describing the name of the data type
  556.      to use for wide characters.  The typedef name `wchar_t' is defined
  557.      using the contents of the string.  See `SIZE_TYPE' above for more
  558.      information.
  559.  
  560.      If you don't define this macro, the default is `"int"'.
  561.  
  562. `WCHAR_TYPE_SIZE'
  563.      A C expression for the size in bits of the data type for wide
  564.      characters.  This is used in `cpp', which cannot make use of
  565.      `WCHAR_TYPE'.
  566.  
  567. `MAX_WCHAR_TYPE_SIZE'
  568.      Maximum number for the size in bits of the data type for wide
  569.      characters.  If this is undefined, the default is
  570.      `WCHAR_TYPE_SIZE'.  Otherwise, it is the constant value that is the
  571.      largest value that `WCHAR_TYPE_SIZE' can have at run-time.  This is
  572.      used in `cpp'.
  573.  
  574. `OBJC_INT_SELECTORS'
  575.      Define this macro if the type of Objective C selectors should be
  576.      `int'.
  577.  
  578.      If this macro is not defined, then selectors should have the type
  579.      `struct objc_selector *'.
  580.  
  581. `OBJC_SELECTORS_WITHOUT_LABELS'
  582.      Define this macro if the compiler can group all the selectors
  583.      together into a vector and use just one label at the beginning of
  584.      the vector.  Otherwise, the compiler must give each selector its
  585.      own assembler label.
  586.  
  587.      On certain machines, it is important to have a separate label for
  588.      each selector because this enables the linker to eliminate
  589.      duplicate selectors.
  590.  
  591. `TARGET_BELL'
  592.      A C constant expression for the integer value for escape sequence
  593.      `\a'.
  594.  
  595. `TARGET_BS'
  596. `TARGET_TAB'
  597. `TARGET_NEWLINE'
  598.      C constant expressions for the integer values for escape sequences
  599.      `\b', `\t' and `\n'.
  600.  
  601. `TARGET_VT'
  602. `TARGET_FF'
  603. `TARGET_CR'
  604.      C constant expressions for the integer values for escape sequences
  605.      `\v', `\f' and `\r'.
  606.  
  607. 
  608. File: gcc.info,  Node: Registers,  Next: Register Classes,  Prev: Type Layout,  Up: Target Macros
  609.  
  610. Register Usage
  611. ==============
  612.  
  613.    This section explains how to describe what registers the target
  614. machine has, and how (in general) they can be used.
  615.  
  616.    The description of which registers a specific instruction can use is
  617. done with register classes; see *Note Register Classes::..  For
  618. information on using registers to access a stack frame, see *Note Frame
  619. Registers::..  For passing values in registers, see *Note Register
  620. Arguments::..  For returning values in registers, see *Note Scalar
  621. Return::..
  622.  
  623. * Menu:
  624.  
  625. * Register Basics::        Number and kinds of registers.
  626. * Allocation Order::        Order in which registers are allocated.
  627. * Values in Registers::        What kinds of values each reg can hold.
  628. * Leaf Functions::        Renumbering registers for leaf functions.
  629. * Stack Registers::        Handling a register stack such as 80387.
  630. * Obsolete Register Macros::    Macros formerly used for the 80387.
  631.  
  632. 
  633. File: gcc.info,  Node: Register Basics,  Next: Allocation Order,  Up: Registers
  634.  
  635. Basic Characteristics of Registers
  636. ----------------------------------
  637.  
  638.    Registers have various characteristics.
  639.  
  640. `FIRST_PSEUDO_REGISTER'
  641.      Number of hardware registers known to the compiler.  They receive
  642.      numbers 0 through `FIRST_PSEUDO_REGISTER-1'; thus, the first
  643.      pseudo register's number really is assigned the number
  644.      `FIRST_PSEUDO_REGISTER'.
  645.  
  646. `FIXED_REGISTERS'
  647.      An initializer that says which registers are used for fixed
  648.      purposes all throughout the compiled code and are therefore not
  649.      available for general allocation.  These would include the stack
  650.      pointer, the frame pointer (except on machines where that can be
  651.      used as a general register when no frame pointer is needed), the
  652.      program counter on machines where that is considered one of the
  653.      addressable registers, and any other numbered register with a
  654.      standard use.
  655.  
  656.      This information is expressed as a sequence of numbers, separated
  657.      by commas and surrounded by braces.  The Nth number is 1 if
  658.      register N is fixed, 0 otherwise.
  659.  
  660.      The table initialized from this macro, and the table initialized by
  661.      the following one, may be overridden at run time either
  662.      automatically, by the actions of the macro
  663.      `CONDITIONAL_REGISTER_USAGE', or by the user with the command
  664.      options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'.
  665.  
  666. `CALL_USED_REGISTERS'
  667.      Like `FIXED_REGISTERS' but has 1 for each register that is
  668.      clobbered (in general) by function calls as well as for fixed
  669.      registers.  This macro therefore identifies the registers that are
  670.      not available for general allocation of values that must live
  671.      across function calls.
  672.  
  673.      If a register has 0 in `CALL_USED_REGISTERS', the compiler
  674.      automatically saves it on function entry and restores it on
  675.      function exit, if the register is used within the function.
  676.  
  677. `HARD_REGNO_CALL_PART_CLOBBERED (REGNO, MODE)'
  678.      A C expression that is non-zero if it is not permissible to store a
  679.      value of mode MODE in hard register number REGNO across a call
  680.      without some part of it being clobbered.  For most machines this
  681.      macro need not be defined.  It is only required for machines that
  682.      do not preserve the entire contents of a register across a call.
  683.  
  684. `CONDITIONAL_REGISTER_USAGE'
  685.      Zero or more C statements that may conditionally modify four
  686.      variables `fixed_regs', `call_used_regs', `global_regs' (these
  687.      three are of type `char []') and `reg_class_contents' (of type
  688.      `HARD_REG_SET').  Before the macro is called `fixed_regs',
  689.      `call_used_regs' and `reg_class_contents' have been initialized
  690.      from `FIXED_REGISTERS', `CALL_USED_REGISTERS' and
  691.      `REG_CLASS_CONTENTS', respectively, `global_regs' has been
  692.      cleared, and any `-ffixed-REG', `-fcall-used-REG' and
  693.      `-fcall-saved-REG' command options have been applied.
  694.  
  695.      This is necessary in case the fixed or call-clobbered registers
  696.      depend on target flags.
  697.  
  698.      You need not define this macro if it has no work to do.
  699.  
  700.      If the usage of an entire class of registers depends on the target
  701.      flags, you may indicate this to GCC by using this macro to modify
  702.      `fixed_regs' and `call_used_regs' to 1 for each of the registers
  703.      in the classes which should not be used by GCC.  Also define the
  704.      macro `REG_CLASS_FROM_LETTER' to return `NO_REGS' if it is called
  705.      with a letter for a class that shouldn't be used.
  706.  
  707.      (However, if this class is not included in `GENERAL_REGS' and all
  708.      of the insn patterns whose constraints permit this class are
  709.      controlled by target switches, then GCC will automatically avoid
  710.      using these registers when the target switches are opposed to
  711.      them.)
  712.  
  713. `NON_SAVING_SETJMP'
  714.      If this macro is defined and has a nonzero value, it means that
  715.      `setjmp' and related functions fail to save the registers, or that
  716.      `longjmp' fails to restore them.  To compensate, the compiler
  717.      avoids putting variables in registers in functions that use
  718.      `setjmp'.
  719.  
  720. `INCOMING_REGNO (OUT)'
  721.      Define this macro if the target machine has register windows.
  722.      This C expression returns the register number as seen by the
  723.      called function corresponding to the register number OUT as seen
  724.      by the calling function.  Return OUT if register number OUT is not
  725.      an outbound register.
  726.  
  727. `OUTGOING_REGNO (IN)'
  728.      Define this macro if the target machine has register windows.
  729.      This C expression returns the register number as seen by the
  730.      calling function corresponding to the register number IN as seen
  731.      by the called function.  Return IN if register number IN is not an
  732.      inbound register.
  733.  
  734. 
  735. File: gcc.info,  Node: Allocation Order,  Next: Values in Registers,  Prev: Register Basics,  Up: Registers
  736.  
  737. Order of Allocation of Registers
  738. --------------------------------
  739.  
  740.    Registers are allocated in order.
  741.  
  742. `REG_ALLOC_ORDER'
  743.      If defined, an initializer for a vector of integers, containing the
  744.      numbers of hard registers in the order in which GNU CC should
  745.      prefer to use them (from most preferred to least).
  746.  
  747.      If this macro is not defined, registers are used lowest numbered
  748.      first (all else being equal).
  749.  
  750.      One use of this macro is on machines where the highest numbered
  751.      registers must always be saved and the save-multiple-registers
  752.      instruction supports only sequences of consecutive registers.  On
  753.      such machines, define `REG_ALLOC_ORDER' to be an initializer that
  754.      lists the highest numbered allocable register first.
  755.  
  756. `ORDER_REGS_FOR_LOCAL_ALLOC'
  757.      A C statement (sans semicolon) to choose the order in which to
  758.      allocate hard registers for pseudo-registers local to a basic
  759.      block.
  760.  
  761.      Store the desired register order in the array `reg_alloc_order'.
  762.      Element 0 should be the register to allocate first; element 1, the
  763.      next register; and so on.
  764.  
  765.      The macro body should not assume anything about the contents of
  766.      `reg_alloc_order' before execution of the macro.
  767.  
  768.      On most machines, it is not necessary to define this macro.
  769.  
  770. 
  771. File: gcc.info,  Node: Values in Registers,  Next: Leaf Functions,  Prev: Allocation Order,  Up: Registers
  772.  
  773. How Values Fit in Registers
  774. ---------------------------
  775.  
  776.    This section discusses the macros that describe which kinds of values
  777. (specifically, which machine modes) each register can hold, and how many
  778. consecutive registers are needed for a given mode.
  779.  
  780. `HARD_REGNO_NREGS (REGNO, MODE)'
  781.      A C expression for the number of consecutive hard registers,
  782.      starting at register number REGNO, required to hold a value of mode
  783.      MODE.
  784.  
  785.      On a machine where all registers are exactly one word, a suitable
  786.      definition of this macro is
  787.  
  788.           #define HARD_REGNO_NREGS(REGNO, MODE)            \
  789.              ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1)  \
  790.               / UNITS_PER_WORD))
  791.  
  792. `ALTER_HARD_SUBREG (TGT_MODE, WORD, SRC_MODE, REGNO)'
  793.      A C expression that returns an adjusted hard register number for
  794.  
  795.           (subreg:TGT_MODE (reg:SRC_MODE REGNO) WORD)
  796.  
  797.      This may be needed if the target machine has mixed sized big-endian
  798.      registers, like Sparc v9.
  799.  
  800. `HARD_REGNO_MODE_OK (REGNO, MODE)'
  801.      A C expression that is nonzero if it is permissible to store a
  802.      value of mode MODE in hard register number REGNO (or in several
  803.      registers starting with that one).  For a machine where all
  804.      registers are equivalent, a suitable definition is
  805.  
  806.           #define HARD_REGNO_MODE_OK(REGNO, MODE) 1
  807.  
  808.      You need not include code to check for the numbers of fixed
  809.      registers, because the allocation mechanism considers them to be
  810.      always occupied.
  811.  
  812.      On some machines, double-precision values must be kept in even/odd
  813.      register pairs.  You can implement that by defining this macro to
  814.      reject odd register numbers for such modes.
  815.  
  816.      The minimum requirement for a mode to be OK in a register is that
  817.      the `movMODE' instruction pattern support moves between the
  818.      register and other hard register in the same class and that moving
  819.      a value into the register and back out not alter it.
  820.  
  821.      Since the same instruction used to move `word_mode' will work for
  822.      all narrower integer modes, it is not necessary on any machine for
  823.      `HARD_REGNO_MODE_OK' to distinguish between these modes, provided
  824.      you define patterns `movhi', etc., to take advantage of this.  This
  825.      is useful because of the interaction between `HARD_REGNO_MODE_OK'
  826.      and `MODES_TIEABLE_P'; it is very desirable for all integer modes
  827.      to be tieable.
  828.  
  829.      Many machines have special registers for floating point arithmetic.
  830.      Often people assume that floating point machine modes are allowed
  831.      only in floating point registers.  This is not true.  Any
  832.      registers that can hold integers can safely *hold* a floating
  833.      point machine mode, whether or not floating arithmetic can be done
  834.      on it in those registers.  Integer move instructions can be used
  835.      to move the values.
  836.  
  837.      On some machines, though, the converse is true: fixed-point machine
  838.      modes may not go in floating registers.  This is true if the
  839.      floating registers normalize any value stored in them, because
  840.      storing a non-floating value there would garble it.  In this case,
  841.      `HARD_REGNO_MODE_OK' should reject fixed-point machine modes in
  842.      floating registers.  But if the floating registers do not
  843.      automatically normalize, if you can store any bit pattern in one
  844.      and retrieve it unchanged without a trap, then any machine mode
  845.      may go in a floating register, so you can define this macro to say
  846.      so.
  847.  
  848.      The primary significance of special floating registers is rather
  849.      that they are the registers acceptable in floating point arithmetic
  850.      instructions.  However, this is of no concern to
  851.      `HARD_REGNO_MODE_OK'.  You handle it by writing the proper
  852.      constraints for those instructions.
  853.  
  854.      On some machines, the floating registers are especially slow to
  855.      access, so that it is better to store a value in a stack frame
  856.      than in such a register if floating point arithmetic is not being
  857.      done.  As long as the floating registers are not in class
  858.      `GENERAL_REGS', they will not be used unless some pattern's
  859.      constraint asks for one.
  860.  
  861. `MODES_TIEABLE_P (MODE1, MODE2)'
  862.      A C expression that is nonzero if a value of mode MODE1 is
  863.      accessible in mode MODE2 without copying.
  864.  
  865.      If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R,
  866.      MODE2)' are always the same for any R, then `MODES_TIEABLE_P
  867.      (MODE1, MODE2)' should be nonzero.  If they differ for any R, you
  868.      should define this macro to return zero unless some other
  869.      mechanism ensures the accessibility of the value in a narrower
  870.      mode.
  871.  
  872.      You should define this macro to return nonzero in as many cases as
  873.      possible since doing so will allow GNU CC to perform better
  874.      register allocation.
  875.  
  876. `AVOID_CCMODE_COPIES'
  877.      Define this macro if the compiler should avoid copies to/from
  878.      `CCmode' registers.  You should only define this macro if support
  879.      fo copying to/from `CCmode' is incomplete.
  880.  
  881. 
  882. File: gcc.info,  Node: Leaf Functions,  Next: Stack Registers,  Prev: Values in Registers,  Up: Registers
  883.  
  884. Handling Leaf Functions
  885. -----------------------
  886.  
  887.    On some machines, a leaf function (i.e., one which makes no calls)
  888. can run more efficiently if it does not make its own register window.
  889. Often this means it is required to receive its arguments in the
  890. registers where they are passed by the caller, instead of the registers
  891. where they would normally arrive.
  892.  
  893.    The special treatment for leaf functions generally applies only when
  894. other conditions are met; for example, often they may use only those
  895. registers for its own variables and temporaries.  We use the term "leaf
  896. function" to mean a function that is suitable for this special
  897. handling, so that functions with no calls are not necessarily "leaf
  898. functions".
  899.  
  900.    GNU CC assigns register numbers before it knows whether the function
  901. is suitable for leaf function treatment.  So it needs to renumber the
  902. registers in order to output a leaf function.  The following macros
  903. accomplish this.
  904.  
  905. `LEAF_REGISTERS'
  906.      A C initializer for a vector, indexed by hard register number,
  907.      which contains 1 for a register that is allowable in a candidate
  908.      for leaf function treatment.
  909.  
  910.      If leaf function treatment involves renumbering the registers,
  911.      then the registers marked here should be the ones before
  912.      renumbering--those that GNU CC would ordinarily allocate.  The
  913.      registers which will actually be used in the assembler code, after
  914.      renumbering, should not be marked with 1 in this vector.
  915.  
  916.      Define this macro only if the target machine offers a way to
  917.      optimize the treatment of leaf functions.
  918.  
  919. `LEAF_REG_REMAP (REGNO)'
  920.      A C expression whose value is the register number to which REGNO
  921.      should be renumbered, when a function is treated as a leaf
  922.      function.
  923.  
  924.      If REGNO is a register number which should not appear in a leaf
  925.      function before renumbering, then the expression should yield -1,
  926.      which will cause the compiler to abort.
  927.  
  928.      Define this macro only if the target machine offers a way to
  929.      optimize the treatment of leaf functions, and registers need to be
  930.      renumbered to do this.
  931.  
  932.    Normally, `FUNCTION_PROLOGUE' and `FUNCTION_EPILOGUE' must treat
  933. leaf functions specially.  They can test the C variable
  934. `current_function_is_leaf' which is nonzero for leaf functions.
  935. `current_function_is_leaf' is set prior to local register allocation
  936. and is valid for the remaining compiler passes.  They can also test the
  937. C variable `current_function_uses_only_leaf_regs' which is nonzero for
  938. leaf functions which only use leaf registers.
  939. `current_function_uses_only_leaf_regs' is valid after reload and is
  940. only useful if `LEAF_REGISTERS' is defined.
  941.  
  942. 
  943. File: gcc.info,  Node: Stack Registers,  Next: Obsolete Register Macros,  Prev: Leaf Functions,  Up: Registers
  944.  
  945. Registers That Form a Stack
  946. ---------------------------
  947.  
  948.    There are special features to handle computers where some of the
  949. "registers" form a stack, as in the 80387 coprocessor for the 80386.
  950. Stack registers are normally written by pushing onto the stack, and are
  951. numbered relative to the top of the stack.
  952.  
  953.    Currently, GNU CC can only handle one group of stack-like registers,
  954. and they must be consecutively numbered.
  955.  
  956. `STACK_REGS'
  957.      Define this if the machine has any stack-like registers.
  958.  
  959. `FIRST_STACK_REG'
  960.      The number of the first stack-like register.  This one is the top
  961.      of the stack.
  962.  
  963. `LAST_STACK_REG'
  964.      The number of the last stack-like register.  This one is the
  965.      bottom of the stack.
  966.  
  967. 
  968. File: gcc.info,  Node: Obsolete Register Macros,  Prev: Stack Registers,  Up: Registers
  969.  
  970. Obsolete Macros for Controlling Register Usage
  971. ----------------------------------------------
  972.  
  973.    These features do not work very well.  They exist because they used
  974. to be required to generate correct code for the 80387 coprocessor of the
  975. 80386.  They are no longer used by that machine description and may be
  976. removed in a later version of the compiler.  Don't use them!
  977.  
  978. `OVERLAPPING_REGNO_P (REGNO)'
  979.      If defined, this is a C expression whose value is nonzero if hard
  980.      register number REGNO is an overlapping register.  This means a
  981.      hard register which overlaps a hard register with a different
  982.      number.  (Such overlap is undesirable, but occasionally it allows
  983.      a machine to be supported which otherwise could not be.)  This
  984.      macro must return nonzero for *all* the registers which overlap
  985.      each other.  GNU CC can use an overlapping register only in
  986.      certain limited ways.  It can be used for allocation within a
  987.      basic block, and may be spilled for reloading; that is all.
  988.  
  989.      If this macro is not defined, it means that none of the hard
  990.      registers overlap each other.  This is the usual situation.
  991.  
  992. `INSN_CLOBBERS_REGNO_P (INSN, REGNO)'
  993.      If defined, this is a C expression whose value should be nonzero if
  994.      the insn INSN has the effect of mysteriously clobbering the
  995.      contents of hard register number REGNO.  By "mysterious" we mean
  996.      that the insn's RTL expression doesn't describe such an effect.
  997.  
  998.      If this macro is not defined, it means that no insn clobbers
  999.      registers mysteriously.  This is the usual situation; all else
  1000.      being equal, it is best for the RTL expression to show all the
  1001.      activity.
  1002.  
  1003.